var vm = new Vue({
	el: '#app',
	data: {
		items: [],
		loaded: false
	},
	mounted: function() {
		mailList();
	}
});
/**
 * 通讯录的数据显示
 */
function mailList() {
	var mailListRecord = {
		'name': $("#searchInput").val().trim()
	}
	$.ajax({
		type: "POST",
		url: ip + "platform/user/getAddressBooks.m",
		xhrFields: {
			withCredentials: true
		},
		crossDomain: true,
		data: mailListRecord,
		success: function(data) {
			if(data.statusCode == 0) {
				vm.items = data.result;
			} else if(data.statusCode == 1000) {
				$.toptip("登录失效！", 'error');
				setTimeout('window.location.href = "signIn.html"', 1000);
			} else {
				$.toptip(data.resultDesc, 'error');
			}
		}
	});
}
/**
 * 点击事件
 */
function setMailList(txl) {
	localStorage.setItem('txl', JSON.stringify(txl));
	setTimeout('window.location.href = "detailsOfTheAddressBook.html"', 100);
}